package dproxy.server.common.xml.to;

import java.io.Serializable;

import dproxy.server.cache.dao.DatabaseImplentation;
import dproxy.server.net.protocol.Protocol;

/**
 * Configuration loaded from XML. Represents an:
 * [intermediare]
 *      [description /]
 *      [protocol-name /]
 *      [local-port /]
 *      [remote-host /]
 *      [remote-port /]
 *  [/intermediare].
 */
public class IntermediareConfig implements Serializable {

    /** SVUID */
	private static final long serialVersionUID = 1L;
	
	/* Sub-elements */
    /** Protocol name. */
    private String protocolName;
    /** Protocol. */
    private Protocol protocol;
    /** Description. */
    private String description;
    /** Local binding port. */
    private int localPort;
    /** Remote host. */
    private String remoteHost;
    /** Remote port. */
    private int remotePort;
    
    /* Attributes */
    /** Cache implementation used by this intermediare. */
    private DatabaseImplentation databaseImplentation;
    
    /**
     * @return Returns the description.
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description The description to set.
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return Returns the localPort.
     */
    public int getLocalPort() {
        return localPort;
    }

    /**
     * @param localPort The localPort to set.
     */
    public void setLocalPort(int localPort) {
        this.localPort = localPort;
    }

    /**
     * @return Returns the protocolName.
     */
    public String getProtocolName() {
        return protocolName;
    }

    /**
     * @param protocolName The protocolName to set.
     */
    public void setProtocolName(String protocolName) {
        this.protocolName = protocolName;
    }

    /**
     * @return Returns the remoteHost.
     */
    public String getRemoteHost() {
        return remoteHost;
    }

    /**
     * @param remoteHost The remoteHost to set.
     */
    public void setRemoteHost(String remoteHost) {
        this.remoteHost = remoteHost;
    }

    /**
     * @return Returns the remotePort.
     */
    public int getRemotePort() {
        return remotePort;
    }

    /**
     * @param remotePort The remotePort to set.
     */
    public void setRemotePort(int remotePort) {
        this.remotePort = remotePort;
    }

    /**
     * @return Returns the protocol.
     */
    public Protocol getProtocol() {
        return protocol;
    }

    /**
     * @param protocol The protocol to set.
     */
    public void setProtocol(Protocol protocol) {
        this.protocol = protocol;
    }

    /**
     * @return Returns the databaseImplentation.
     */
    public DatabaseImplentation getDatabaseImplentation() {
        return databaseImplentation;
    }

    /**
     * @param databaseImplentation The databaseImplentation to set.
     */
    public void setDatabaseImplentation(DatabaseImplentation databaseImplentation) {
        this.databaseImplentation = databaseImplentation;
    }
    
}
